UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KlZj7A1PTxmpPng/ew4kH1l8JfckY+7JqtQm9IL1QNw='
WHERE
key_id = '62543995894472d54677907f056d0ae0016fc55d5499365fb31a2ef8493f334c'
AND (
token = 'KlZj7A1PTxmpPng/ew4kH1l8JfckY+7JqtQm9IL1QNw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)