UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/HqrnFt/da+c6M7e//MSkoZJWx2FfSML9MSx0gic9Yk='
WHERE
key_id = 'ddbebd3c55b48fa7cb97348487ad15946cada7ca98bfeda4fb7448f1ebc123c9'
AND (
token = '/HqrnFt/da+c6M7e//MSkoZJWx2FfSML9MSx0gic9Yk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)