UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lsIKaYV9Pi2XwR6NpT393bUy4cuWvj7BGCFVLWmT3DY='
WHERE
key_id = '0cb3c258bdc81db2cdf6ddbc7fbfd6cea375de9b80b67b7d047e8012f5286290'
AND (
token = 'lsIKaYV9Pi2XwR6NpT393bUy4cuWvj7BGCFVLWmT3DY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)