UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7Fh+YBvV7tStTIlqcxk9GBCLkLlSIC+zh2C/0M6PT4g=' 
WHERE 
  key_id = '264a8dba20dfe5bdc824bc3a40c226d9c38fe122f8909f45b057b571a6ef4a19' 
  AND (
    token = '7Fh+YBvV7tStTIlqcxk9GBCLkLlSIC+zh2C/0M6PT4g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041