UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'De7DLl/4A0u5yswJ5XVofE//Tnx8aHLrOJWRc7GDxG4=' 
WHERE 
  key_id = 'ab97b5eb056199379414274614d63143df6ed5bdc7a522c292551d591dd02cb3' 
  AND (
    token = 'De7DLl/4A0u5yswJ5XVofE//Tnx8aHLrOJWRc7GDxG4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033