UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FToL2+pMpOsW8635DyxS3U3DHw/tN9/K3SaXD54mNAA='
WHERE
key_id = '61f781b636c1d34cd6c904b974ea9f0fc9c896117033d6a8800583b19a6f43a3'
AND (
token = 'FToL2+pMpOsW8635DyxS3U3DHw/tN9/K3SaXD54mNAA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)