UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/m6OJsXB4EO6Nxf8QottOqFvLpTJdJlPRRj4dPlmPuY=' 
WHERE 
  key_id = '57ed65a7e722d66af31c49365bbaaebe4126b77f6e408b1df61a472f0e093cfd' 
  AND (
    token = '/m6OJsXB4EO6Nxf8QottOqFvLpTJdJlPRRj4dPlmPuY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054