UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qoiOxXibrzwZMlD+JyFJRCEnAGsqb55vY8Cwzu3kKf4=' 
WHERE 
  key_id = 'f0c3b32fbb43be9a6b1a701f77ba2e815914d1b26146cba15fc7039035e0581d' 
  AND (
    token = 'qoiOxXibrzwZMlD+JyFJRCEnAGsqb55vY8Cwzu3kKf4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036