UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '90nUfVzLWdsolcSN8EvGet8PC+PGkmDilLeCP76MvwA=' 
WHERE 
  key_id = '206b4c7d12fbee556b36ede3b2845519272a6798ea2ad58453e06c95f5336ecc' 
  AND (
    token = '90nUfVzLWdsolcSN8EvGet8PC+PGkmDilLeCP76MvwA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020