UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7oJYdX7btF3RuX/IEBiyr5hN29UU98+hPdpk/7iIX0s=' 
WHERE 
  key_id = 'd82529ca67e55563cf4e392697fb8c012064bd85c4e3f778141ce4ba853b9f1c' 
  AND (
    token = '7oJYdX7btF3RuX/IEBiyr5hN29UU98+hPdpk/7iIX0s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032