UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mk9miBOAFYlcjsEFdDrEdXZ5zuVg4DveODGWsssv4uk=' 
WHERE 
  key_id = '06c5f4a933323c2a5ff9e1ece2338210070c43cfbf01d78e5cadba266a1be8c0' 
  AND (
    token = 'mk9miBOAFYlcjsEFdDrEdXZ5zuVg4DveODGWsssv4uk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035