UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kncv2XsZr+U3Q8mdu6Y1F/cJfUEMvykf9gCaZ6YM5kY=' 
WHERE 
  key_id = '8a61887eebba07cb6cdbd7eb2c273d70419c209071daec2a68b3d9f48c95c007' 
  AND (
    token = 'kncv2XsZr+U3Q8mdu6Y1F/cJfUEMvykf9gCaZ6YM5kY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014