UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VUwIk1KDDuAEEO3SJoodple4Pr3orziMWWizMZGs3AA='
WHERE
key_id = '3e0c13b22d5d5a687ba7c1e4c5963bfdf43324b11712b2445286d792e730796f'
AND (
token = 'VUwIk1KDDuAEEO3SJoodple4Pr3orziMWWizMZGs3AA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)