UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5zVD85Guf6Pqj1v0MZv0kkL+8vSCYcnWn2o7iGb2gD8=' 
WHERE 
  key_id = '8c63d6ed2d23301e5c69e4dc69eed19f1dfe9130283194abb377e5a2da6f4826' 
  AND (
    token = '5zVD85Guf6Pqj1v0MZv0kkL+8vSCYcnWn2o7iGb2gD8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028