UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nvWC/JuqNYiMgfuKg0owfgNNCG3n5EtFrzUUrupyXZU='
WHERE
key_id = '0209791654a46206936a72ce62fb027a0fc8adfbb65ab03de40dc8354f831f13'
AND (
token = 'nvWC/JuqNYiMgfuKg0owfgNNCG3n5EtFrzUUrupyXZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)