UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B2AVvpOYt/tOl3pvvNuRVmT8aj0lUaMXuJ1jQJCG5N0='
WHERE
key_id = '01086ae965f1dbdbb88b94da85b5b80384c75c01b3bac1ad669a24f356a6b346'
AND (
token = 'B2AVvpOYt/tOl3pvvNuRVmT8aj0lUaMXuJ1jQJCG5N0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)