UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9Uf4WVdn6RQHH8UJdOFLntvFz+kFJxPi9WzaDJCb+Uo='
WHERE
key_id = '73be1edcbe2fe30f43fe6c939df1ed8fd833f2a9668d50c6cdfbc089442fc845'
AND (
token = '9Uf4WVdn6RQHH8UJdOFLntvFz+kFJxPi9WzaDJCb+Uo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)