UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eiKr7OJ/lzp9PL2z8pPlMy6zA8L05Juy2YDRolicmSU='
WHERE
key_id = '262d12f3cf78e4cfe7a11e5aae9d1cc1e2de720d39948a1c2459ddfe638ef3f8'
AND (
token = 'eiKr7OJ/lzp9PL2z8pPlMy6zA8L05Juy2YDRolicmSU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)