UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uF30WlLpF0NE+gAe7akyfIcz3HI/l2mCqnf4frWteQs=' 
WHERE 
  key_id = '79db802735f3142502554e46ba59da776d055acf4846fa6c13b876fec2724015' 
  AND (
    token = 'uF30WlLpF0NE+gAe7akyfIcz3HI/l2mCqnf4frWteQs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037