UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/28dUf/Lad9F9Xj702uAyQnKpLUjNFmip9L7IIP00wM=' 
WHERE 
  key_id = '5ed833124522cbe973c8bf1138afb5be3f13e2ce5152c0eded4ca98e26d42583' 
  AND (
    token = '/28dUf/Lad9F9Xj702uAyQnKpLUjNFmip9L7IIP00wM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042