UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/KM8uCpUiF9HkMJTgBMUQfjTZrGG1ggpROXHIhfQ/xo='
WHERE
key_id = '0fdc76092441481a7c5f6ad542a9e8ddf837bd863f338286fb6d9b80cb321192'
AND (
token = '/KM8uCpUiF9HkMJTgBMUQfjTZrGG1ggpROXHIhfQ/xo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)