UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm+jExG4ZJTR4PxHfgeSfaKKyvsAij+TT0UoZCMC3GVc='
WHERE
key_id = 'f61f26c9e60a23a9923d34de89b2624642de65ce6e80f6f1256191520866e01b'
AND (
token = 'm+jExG4ZJTR4PxHfgeSfaKKyvsAij+TT0UoZCMC3GVc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)