UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9HU1uKTIeyB2NKsWp9OSeBzPxpAFXXTkkfGM6LvxKBw='
WHERE
key_id = '734bf0258fc277cd7aac8e9e570180bb37419a8db2419d9e6ad9f0dbfb8e56c6'
AND (
token = '9HU1uKTIeyB2NKsWp9OSeBzPxpAFXXTkkfGM6LvxKBw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)