UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uqMBlKIVXYu/nqsc0aFwz/bP7GMQrFARcvvpwgi7lFM=' 
WHERE 
  key_id = 'ce6470f727a92428ca7495a2573c5e85c260af4b6517a7c475b3296ee086d0fd' 
  AND (
    token = 'uqMBlKIVXYu/nqsc0aFwz/bP7GMQrFARcvvpwgi7lFM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037