UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zolb6M/eQxmHQqQ8SfDVP+oasTtNsAFjOuKCZ+kpBYk='
WHERE
key_id = '6abab3503d5c4b0e54cf140a49b49f0dc2804450cd35397f3416d819c0dec38f'
AND (
token = 'Zolb6M/eQxmHQqQ8SfDVP+oasTtNsAFjOuKCZ+kpBYk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)