UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3YPCid0jPRySt9jUkBqsTRTkYxS5V3DNoHryPzIo/MQ='
WHERE
key_id = '9ea701b928df797bb9d1094481d07b3b0202d172b29d6490ca7509076e5b4e85'
AND (
token = '3YPCid0jPRySt9jUkBqsTRTkYxS5V3DNoHryPzIo/MQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)