UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wzTK2VZWIrb44IUSsH/ztwbDLm8vz0HUUq6JISplNE0=' 
WHERE 
  key_id = '196707a9fe88e9ccb881141ffebd222e6564ba71e36bae9994ca59ea176cc1ab' 
  AND (
    token = 'wzTK2VZWIrb44IUSsH/ztwbDLm8vz0HUUq6JISplNE0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018