UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'T2Q1oqrK1I3YkR5M8lju/DEFoUCtNubNO3AVG1gQFBg='
WHERE
key_id = 'fd32c048dd167ccf746e898e35ae90ab8c8affddc2c88a1d01d0ce3b7a9d5124'
AND (
token = 'T2Q1oqrK1I3YkR5M8lju/DEFoUCtNubNO3AVG1gQFBg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)