UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '78JePgVzEGRJFnb0GD8wwXhsscbh/oCbYusY4iQdIqI='
WHERE
key_id = 'f10f34f5e2ae69c70ad6af5f2e6980b16723599428a5ed27fe9f672826bb8541'
AND (
token = '78JePgVzEGRJFnb0GD8wwXhsscbh/oCbYusY4iQdIqI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)