UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YW44GwwBPCV8K8l7sA5eSwfCTOUtXGELGkvAYD0/jQI='
WHERE
key_id = 'd8044fbac996bab5f11b7a19ea9099547aa6a51c9e810fc5e56f360f7b6ee5a3'
AND (
token = 'YW44GwwBPCV8K8l7sA5eSwfCTOUtXGELGkvAYD0/jQI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)