UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FnpBSggXIkhzKNwxDXEbq4YM7UDQ/sNHofQptIrkmKU='
WHERE
key_id = '8b13fdb81f3685ed118fa6d115925e18d0b5736129e02c71889f987c009b44ff'
AND (
token = 'FnpBSggXIkhzKNwxDXEbq4YM7UDQ/sNHofQptIrkmKU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)