UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GHmNLtiOSXLopUB1QDognlTP7uwt55ESFlq0Aa4BowA='
WHERE
key_id = 'db29ae187d83ac3b06991fadb4cdf7b1c65fbab90f43adf374c87c4d89428b85'
AND (
token = 'GHmNLtiOSXLopUB1QDognlTP7uwt55ESFlq0Aa4BowA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)