UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GTplayQbGm+aWJeZKlv5fyqmxUXL9TJTUHWIb14iEDQ=' 
WHERE 
  key_id = '92b975b74f9da00b1f33c568852aebcb89b59e2e84ad4ece9941d40e515e8932' 
  AND (
    token = 'GTplayQbGm+aWJeZKlv5fyqmxUXL9TJTUHWIb14iEDQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014