UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'az/RX2Wx5uB22VHyQVROHOd8ULGodQyJCOCmOJqUcVQ='
WHERE
key_id = '5d9a2c3dd4b9e15d232ca460eb56a549c84072b17e83ed01e5082c21fc1bd060'
AND (
token = 'az/RX2Wx5uB22VHyQVROHOd8ULGodQyJCOCmOJqUcVQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)