UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AJ6eLgqo+M/S7Xq+0pjZh6njFeuTFa/v7XjCTSNyLWo='
WHERE
key_id = '1acd99eb10927397c93293c5ab78bb586ddfb19755d459747ca95c7bd244b7d3'
AND (
token = 'AJ6eLgqo+M/S7Xq+0pjZh6njFeuTFa/v7XjCTSNyLWo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)