UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Y46AfAkYgz01z21UMG5481iZypOLBZYIrQ2z+Zybio='
WHERE
key_id = '68d70e8ad6f91208405ec7972ffe2d47367a661e42a55b07f4eaa261d4e210a1'
AND (
token = '1Y46AfAkYgz01z21UMG5481iZypOLBZYIrQ2z+Zybio='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)