UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/pJapcSd7mr7Co/x/2YYeAObLxoFN8jBv0nww++WqAg=' 
WHERE 
  key_id = '321bc10affb0aac51e028547cdef9a0e8b377e6b343e28fd7931a0803bd591e5' 
  AND (
    token = '/pJapcSd7mr7Co/x/2YYeAObLxoFN8jBv0nww++WqAg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033