UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0qQFj+tFHTaVNG+zU9FY4rzFbVQ3C4rXtViV9gfgPdk='
WHERE
key_id = '6ec26d816f555bd801a72b799c324e9bb63934d3ae841e1975fe11ef7b8dca4f'
AND (
token = '0qQFj+tFHTaVNG+zU9FY4rzFbVQ3C4rXtViV9gfgPdk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)