UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7FUCEoedstNyu8QfhcxS9hoomVKcHXuQnFLsJPSK7oM='
WHERE
key_id = '7c69dc5454fb99c991f7dd01bdfdb6be86519c3282b55b5823733682e3b1db84'
AND (
token = '7FUCEoedstNyu8QfhcxS9hoomVKcHXuQnFLsJPSK7oM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)