UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+gSGQEgDPcRBcufypNVDYL+KyoL3dKCqXbsS/GSeGB4=' 
WHERE 
  key_id = '379b812accd31fa39f7eba627d3c0112722d488d959f0613fd910a2d0481dbbe' 
  AND (
    token = '+gSGQEgDPcRBcufypNVDYL+KyoL3dKCqXbsS/GSeGB4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027