UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+vLpPERymyTAAAcUzcvds8K6vwcrRf0F9PGi5VJY9f0=' 
WHERE 
  key_id = '113e2b7c316922d07102cf55d1adb07113d753ca673d79ac418207a338f5e6d5' 
  AND (
    token = '+vLpPERymyTAAAcUzcvds8K6vwcrRf0F9PGi5VJY9f0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060