UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qVqlH++dALxtWdOIOPbAULpDV3VqTvtro07AtJWM3ck=' 
WHERE 
  key_id = '2af9ae0200c73f59d138e524cf726342d9de4dc6146b3cc5ecbad0f5fad1bd75' 
  AND (
    token = 'qVqlH++dALxtWdOIOPbAULpDV3VqTvtro07AtJWM3ck=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020