UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LuuX/S4F6yIQSvqWA+ToJo2qus6fsEgWvR4p6z0XWiI='
WHERE
key_id = '083a41367d3edfdb6c14fc3827ea9dff7f54031212d9bc07e405d7e278f568f4'
AND (
token = 'LuuX/S4F6yIQSvqWA+ToJo2qus6fsEgWvR4p6z0XWiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)