UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jQDanOTtNJ1W/zpnEX4kMRlww2ZPuN9VOSvF5CveTcI=' 
WHERE 
  key_id = '99c79de96bf3a2da2d64cccbb3c2e32ef23675911ee7fd4bb2dc5a94c20ca2ee' 
  AND (
    token = 'jQDanOTtNJ1W/zpnEX4kMRlww2ZPuN9VOSvF5CveTcI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027