UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CMF/drv3uHWiE2z1ZVAVJLZARONENvmAmHjDRTsPy/c='
WHERE
key_id = 'e4ea34622fc112299d39ffd4d8c19a380a3352ae81763206fc0fac5dcaa40191'
AND (
token = 'CMF/drv3uHWiE2z1ZVAVJLZARONENvmAmHjDRTsPy/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)