UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Px4BLIOwXZLrjtz0+M84FchNrGVv++VRMq3Qzz2P/9E='
WHERE
key_id = '34361b97f9e379ef38dee7836aa0cf09d1f5458bc05da4f2b4f2ec6331c1ea2b'
AND (
token = 'Px4BLIOwXZLrjtz0+M84FchNrGVv++VRMq3Qzz2P/9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)