UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7ASP73v76gHJQZJHTZZRWyTFlPx3uqjny0TCGKdi7GU='
WHERE
key_id = '93e1ca8e78c9a21b8f355c94694b728cc8db06a015ce82adad00dc40a9975449'
AND (
token = '7ASP73v76gHJQZJHTZZRWyTFlPx3uqjny0TCGKdi7GU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)