UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+rlno7RTinxa0s4umZr98ArFTAgOBRgZ2DEjebk93wk=' 
WHERE 
  key_id = '9bfeeb2fbd33d13778297f9272b7f4f9f05726714c6038fac54d4aa83f44e4dc' 
  AND (
    token = '+rlno7RTinxa0s4umZr98ArFTAgOBRgZ2DEjebk93wk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033