UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NeioVU8/QuoDKcRe6aqij3hvqJ+DAYCJbdwJLYTcntU='
WHERE
key_id = '4cfa2374bbe79c7d890b1e846c6173a946b39d951484046297ffe6339fd77cf8'
AND (
token = 'NeioVU8/QuoDKcRe6aqij3hvqJ+DAYCJbdwJLYTcntU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)