UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DrLY88FkejypdJ1YfNJtuveQmbmQxETMWP87jE7Y1/Y=' 
WHERE 
  key_id = '6eb1eae1860426a3507e255ed8b70c18171595d27aa16691101783b6396a887f' 
  AND (
    token = 'DrLY88FkejypdJ1YfNJtuveQmbmQxETMWP87jE7Y1/Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027