UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v0FZDSvVHNebPRgc17t5wEtPJa/B1mbE77NC1KFKH/U='
WHERE
key_id = '0353e21b55284ac118a5d0bc81a36d680a64053f5971b9f01c2824e22ba0fce3'
AND (
token = 'v0FZDSvVHNebPRgc17t5wEtPJa/B1mbE77NC1KFKH/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)