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