UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ukoSveYhvH0gMJR+VCqJgDl6ymtzA/DZJsTNRcEogEI='
WHERE
key_id = 'e60a91eb95d97c368bf90660c816de6d84791043cc93f3a1d3555845faaffb85'
AND (
token = 'ukoSveYhvH0gMJR+VCqJgDl6ymtzA/DZJsTNRcEogEI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)