UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Bc/P76rhs54PEPgKj3D21lwvmjFIDP6JlNGFwj7axOo=' 
WHERE 
  key_id = '61629c926a7908411c35cae5d609fbe9c7f7267ed6c99c08b9c74880ba4bc6b1' 
  AND (
    token = 'Bc/P76rhs54PEPgKj3D21lwvmjFIDP6JlNGFwj7axOo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037