UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PeaqWJhxzfsZFZ/zFB8RXl05KMwvZ8zS5o6o2emoZRQ='
WHERE
key_id = '98dbc58bb96cc2f9b16054f096f0db5d7dfdf186a481336064d3f81cbaa623e0'
AND (
token = 'PeaqWJhxzfsZFZ/zFB8RXl05KMwvZ8zS5o6o2emoZRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)