UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '19vp3ui5UlfWXT4wD5bO1e5k6ZTobKUxcYQztVjxnGo=' 
WHERE 
  key_id = '590dcd09ee90b1f21d2c3fec9e200553f1cfa007a6c634f4ac6943b0303d6cf7' 
  AND (
    token = '19vp3ui5UlfWXT4wD5bO1e5k6ZTobKUxcYQztVjxnGo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039